home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d27
/
bfrcmp.arc
/
BFRCMP.DOC
< prev
next >
Wrap
Text File
|
1990-06-03
|
1KB
|
24 lines
bfrcmp - compare buffers
This is an asm routine written to illustrate interfacing and assembly
of a multisized model assembler program to a c program. It is for learning.
The routine could have been written in c but was not in order to exploit
the string compare instructions on the Intel iAPX86 family.
You call this program as follows:
extern int bfrcmp(char *ptr1, char *ptr2, unsigned size)
ptr1 and ptr2 point to the two areas to compare and size is the length of the
areas. chkbfr, a test routine, shows the use of the function. Checkbfr, a batch
file makes the function, its test program and executes the test.
The function returns zero if the size is zero or if the two areas are
identical.
The function returns the byte number where the two areas are not identical.
Bytes are numbered from 1, and NOT from zero when considering the value of this
function.
See the assembly listing for details of how this routine works. Free.
In the public domain - not beggarware.